#include <XBDrive/XBDrive.h>

enum class EnmuType : int8_t
{
    A = 0,
    B,
    C
};

enum_opt_t EnmuTypes = {
    // clang-format off
    { "A", int8_t(EnmuType::A) },
    { "B", int8_t(EnmuType::B) },
    { "C", int8_t(EnmuType::C) },
    // clang-format on
};

static bool check(char *val)
{
    if (!val)
    {
        DEBUG_port->printf("check\r\n");
    }
    return true;
}

void setup()
{
    xbdrive.setup();
}

void loop()
{
    //xbdrive.loop();
    char temp[128];
    delay(200);
    StepperInput.ToString(temp);
    DEBUG_port->printf("%s,", temp);
    DEBUG_port->printf("ENC: %ld\r\n", encoder_cnt);
    // if (cnt >= 1000)
    // {
    //     DEBUG_port->printf("err:%d, ", motor_pos_err);
    //     DEBUG_port->printf("it:%d, ", pid_iterm);
    //     DEBUG_port->printf("dt:%d, \r\n", pid_dterm);
    //     cnt = 0;
    // }
}